home *** CD-ROM | disk | FTP | other *** search
Makefile | 1995-05-09 | 3.2 KB | 179 lines |
- # A Makefile for xwais
- # Author: Jonny Goldman
- #
- # $Log: My-Makefile,v $
- # Revision 1.16 92/05/08 11:43:46 jonathan
- # Made it work. 8^}
- #
- # Revision 1.15 92/02/17 17:52:56 jonathan
- # Changed to reflect new scheme (executables in this directory, new
- # libraries).
- #
- #
- # if xmkmf didn't work for you, maybe this will.
-
- VERSION = 0.85
-
- XWAIS = ./xwais
- XWAISQ = ./xwaisq
-
- # choose your compiler.
-
- CC = cc
-
- RM = /bin/rm -f
- AR = ar
- ARFLAGS = r
-
-
- # to use Sun shared libraries, use cc
-
- LD = $(CC)
-
- # Edit these to point to your site's X directories.
-
- INSTALLDIR = /usr/local/bin/X11R4
- APPSDIR = /usr/local/lib/X11R4/app-defaults
-
- # if your X libraries are not in the standard places, add a -L to them.
- #LFLAGS = -L/import/X11R4/usr/lib
- #
- #for static linking under SunOS
- #LFLAGS = $(LFLAGS) -Bstatic
-
- # dealing with taking an internet name and resolving it.
- # set to -lresolv or nothing
- #RESOLVER= -lresolv
-
- LIBS = -lXaw -lXmu -lXt -lXext -lX11 $(RESOLVER) -lm
-
- TOP = ..
-
- SRCDIR = $(TOP)/x
- SUPDIR = $(TOP)/ir
- UIDIR = $(TOP)/ui
-
- IR_LIB = $(TOP)/bin/inv.a
-
- PROTOCOL_LIB = $(TOP)/bin/wais.a
-
- LIBFTW = $(TOP)/bin/libftw.a
-
- UI_LIB = $(IR_LIB) $(PROTOCOL_LIB) $(LIBFTW)
-
- LOCAL_LIBRARIES = $(UI_LIB) $(LIBS)
-
- # if you X includes aren't in the usual places, add a -I to them here.
-
- INCLUDES = -I$(SRCDIR) -I$(SUPDIR) -I$(UIDIR)
-
- CFLAGS = $(INCLUDES)
-
- TOBJ = xwais.o \
- display.o \
- tcommands.o \
- scommands.o
-
- QOBJ = xwaisq.o \
- qdisplay.o \
- text.o \
- qcommands.o \
- filereq.o \
- scommands.o \
- $(TOP)/ui/question.o \
- $(TOP)/ui/document.o \
- $(TOP)/ui/wais-ui.o
-
-
- OBJS = util.o \
- $(TOP)/ui/source.o
-
- XWAIS_OBJS = $(TOBJ) $(OBJS)
- XWAISQ_OBJS = $(QOBJ) $(OBJS)
-
- BITS = xwais.bit xwaisq.bit
-
- all:: $(XWAIS) $(XWAISQ) Xwais
-
- xwais.o: xwais.c xwais.h xwais.bit
- $(CC) $(CFLAGS) -c xwais.c
-
- xwaisq.o: xwaisq.c xwais.h xwaisq.bit
- $(CC) $(CFLAGS) -c xwaisq.c
-
- display.o: display.c
- $(CC) $(CFLAGS) -c display.c
-
- qdisplay.o: qdisplay.c
- $(CC) $(CFLAGS) -c qdisplay.c
-
- commands.o: commands.c
- $(CC) $(CFLAGS) -c commands.c
-
- qcommands.o: qcommands.c
- $(CC) $(CFLAGS) -c qcommands.c
-
- scommands.o: scommands.c
- $(CC) $(CFLAGS) -c scommands.c
-
- tcommands.o: tcommands.c
- $(CC) $(CFLAGS) -c tcommands.c
-
- util.o: util.c
- $(CC) $(CFLAGS) -c util.c
-
- qread.o: qread.c
- $(CC) $(CFLAGS) -c qread.c
-
- question.o: question.c
- $(CC) $(CFLAGS) -c question.c
-
- source.o: source.c
- $(CC) $(CFLAGS) -c source.c
-
- document.o: document.c
- $(CC) $(CFLAGS) -c document.c
-
- $(IR_LIB):
- (cd ../ir;make ${IR_LIB})
-
- $(PROTOCOL_LIB):
- (cd ../ir;make ${PROTOCOL_LIB})
-
- $(XWAIS): $(XWAIS_OBJS) $(UI_LIB)
- $(RM) $(XWAIS)
- $(LD) $(LFLAGS) -o $@ $(XWAIS_OBJS) $(LOCAL_LIBRARIES)
-
- $(XWAISQ): $(XWAISQ_OBJS) $(UI_LIB)
- $(RM) $(XWAISQ)
- $(LD) $(LFLAGS) -o $@ $(XWAISQ_OBJS) $(LOCAL_LIBRARIES)
-
- Xwais: Xwais.raw
- ./fixResources.sh Xwais
-
- clean:
- $(RM) *.o
- $(RM) *~
- $(RM) \#*\#
- $(RM) .nfs* # NFS Lossage
- $(RM) *.elc
- $(RM) $(XWAIS)
- $(RM) $(XWAISQ)
- $(RM) Xwais
- $(RM) core
-
- $(INSTALLDIR)/xwais: $(XWAIS)
- cp $(XWAIS) $(INSTALLDIR)/xwais
-
- $(INSTALLDIR)/xwaisq: $(XWAISQ)
- cp $(XWAISQ) $(INSTALLDIR)/xwaisq
-
- $(APPSDIR)/Xwais: Xwais
- cp Xwais $(APPSDIR)/Xwais
-
- INSTALLS = $(INSTALLDIR)/xwais $(INSTALLDIR)/xwaisq \
- $(APPSDIR)/Xwais
-
-
- install: $(INSTALLS)
-